package com.dingwen.stumybplu.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.dingwen.stumybplu.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.sql.Wrapper;
import java.util.List;

/**
 * <p>
 * 系统用户表 Mapper 接口
 * </p>
 *
 * @author dingwen
 * @since 2021-06-07
 */
@Repository
public interface UserMapper extends BaseMapper<User> {

    /**
     *SQL中不写WHERE关键字，且固定使用${ew.customSqlSegment}
     *
     * @param queryWrapper 包装器
     * @return {@link List<User>}
     */
    @Select("select * from sys_user ${ew.customSqlSegment}")
    List<User> findAll(@Param("ew") LambdaQueryWrapper<User> queryWrapper);
}
